<template>
  <div class="select-seat-area-demos-container">
    <div class="area-demos">
      <div class="items" v-for="(item, index) in list" :key="index">
        <div class="icon">
          <image :src="formatIcon(index)" class="normal" />
        </div>
        <div class="price">
          <nut-price
            :price="item.price.user_price"
            size="small"
            :decimal-digits="2"
            :thousands="true"
          />
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { computed, toRefs } from "vue";
import * as seatConfig from "./seat_config";
const props = defineProps({
  list: {
    type: Array<any>,
    required: true,
  },
});
const { list } = toRefs(props);
const formatIcon: any = computed(() => {
  return (index) => {
    return seatConfig.area_arr[index];
  };
});
</script>
<style lang="scss">
.select-seat-area-demos-container {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  .area-demos {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px;
    .items {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      margin: 0 10px;
      .icon {
        padding: 5px;
        color: #858a99;
        font-size: 24px;
        width: 40px;
        height: 40px;
        .normal {
          position: relative;
          /* margin: 10rpx; */
          width: 100%;
          height: 100%;
        }
      }
      .price {
        display: flex;
        flex-direction: column;
        justify-content: center;
      }
    }
  }
}
</style>
